package com.gouaixin.bee.beeframework2.tool;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created by Administrator on 2015/4/15.
 */
//读取文件的工具类
public class IOUtils {

    public static  String readStream(InputStream is) {



        try {

            ByteArrayOutputStream bo = new ByteArrayOutputStream();

            int i = is.read();

            while(i != -1) {

                bo.write(i);

                i = is.read();

            }



            return bo.toString();

        } catch (IOException e) {

            return "";

        }

    }
}
